package io;

import java.io.File;

public class Demo6 {
    public static void main(String[] args) {

        // srcFile 就是源文件   destFile 就是目标文件
        File srcFile = new File("d:/test.txt");
        File destFile = new File("d:/test2.txt");

        boolean ret = srcFile.renameTo(destFile);
        System.out.println("ret = "+ ret);

    }
}
